package com.yongjie.springbootlogin.mapper.Impl;

import com.yongjie.springbootlogin.entity.DoctorInfo;
import com.yongjie.springbootlogin.mapper.DoctorInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author 13468
 */
public class DoctorInfMapperImpl implements DoctorInfoMapper {
    @Autowired
    private DoctorInfoMapper doctorInfoMapper;
    /**
     * 查询所有医生信息
     * @return
     */
    @Override
    public List<DoctorInfo> selectAll() {
        List<DoctorInfo> list = doctorInfoMapper.selectAll();
        return list;
    }


    /**
     * 搜索查询
     * @return
     */
    @Override
    public List<DoctorInfo> checkSelct(String dname,String phone) {
        List<DoctorInfo> list = doctorInfoMapper.checkSelct(dname,phone);
        return list;
    }
    /**
     * 查询单条数据
     */
    @Override
    public DoctorInfo lookInfo(String id) {

        return doctorInfoMapper.lookInfo(id);
    }

    /**
     * 添加医生
     * @param doctorInfo
     * @return
     */
    @Override
    public int addDoctor(DoctorInfo doctorInfo) {
        return doctorInfoMapper.addDoctor(doctorInfo);
    }

    /**
     * 删除医生
     * @param id
     * @return
     */
    @Override
    public int deleteDoctor(String id) {
        return doctorInfoMapper.deleteDoctor(id);
    }

    /**
     * 删除医生账号
     * @param id
     * @return
     */
    @Override
    public int deleteUser(String id) {
        return doctorInfoMapper.deleteUser(id);
    }

}
